package com.example.demo.command2;

import java.util.Map;

/**
 * 厨房(命令接收者)
 */
public class Chef {

    void MakeFood(Order order){
        System.out.println(order.getDinningTable() + "号卓的菜品正在制作中，请稍等！！！");
        for (Map.Entry<String, Integer> entry : order.getOrderMap().entrySet()) {
            System.out.println(entry.getValue() + "份" + entry.getKey() + "做好了");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        System.out.println("美女服务员，过来取餐吧！！！");
    }
}
